import QtQuick 2.0
import NQFramework 1.0
import NQFramework.Logger 1.0
import CustomViews 1.0
import "../QmlComponents/"

Demo {
    id: home
    objectName: setName("root")
    width: APP.width()
    height: APP.height()

    function setName(name) {
        return "view_home_" + name;
    }

    NQRectangle {
        id: container
        objectName: setName("container")
        anchors.fill: parent
        color: "white"

        NQText {
            id: text
            objectName: setName("text")
            text: qsTr("TODO:: design view")
            font.pointSize: 14
            anchors.centerIn: parent
        }

        Button{
            id: btn
            objectName: setName("btn")
            // imgId: "SYS_CHECKBOX_CHECKED"
            // strId: "MSG_MM_00_00_RES_00"
            source: "qrc:///QmlDemon/icon.png"
            text: "button"
            x: 160
            y: 327
            width: 230
            height: 68
            color: "#00000000"
            onClick: {
                home.onBtnClicked(mouse)
            }
        }
    }

    onCreate: {
        NQLogger.debug(APP_LogTag, "view demo was created");
    }

    onPreActive: {
        NQLogger.debug(APP_LogTag, "view demo will be actived");
    }

    onActived: {
        NQLogger.debug(APP_LogTag, "view demo did actived");
    }

    onPreDeactive: {
        NQLogger.debug(APP_LogTag, "view demo will be deactived");
    }

    onDeactived: {
        NQLogger.debug(APP_LogTag, "view demo did deactived");
    }

    onDestroy: {
        NQLogger.debug(APP_LogTag, "view demo will be destroyed");
    }
}
